package ai.people.netmon.framework.model.response;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collection;

/**
 * 分页数据
 *
 * @author yuanqinglong
 * @date 2022/1/7 14:56
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ListResponse<T> {


    /**
     * 数据
     */
    private Collection<T> list;


    /**
     * 构建器
     *
     * @param data  数据
     * @return {@link ListResponse}<{@link T}>
     */
    public static <T> ListResponse<T> builder(Collection<T> data){
        return new ListResponse<>(data);
    }


}
